package com.cn.generator.config;
import javax.sql.DataSource;  
import org.springframework.boot.context.properties.ConfigurationProperties;  
import org.springframework.context.annotation.Bean;  
import org.springframework.context.annotation.Configuration;  
import com.alibaba.druid.pool.DruidDataSource;  

/**
 * @ClassName: DruidDataSourceConfiguration
 * @Description: TODO
 * @author Administrator
 * @date 2017年6月13日
 */
@Configuration  
public class DruidDataSourceConfiguration {

    @Bean  
    @ConfigurationProperties(prefix = "spring.datasource")  
    public DataSource druidDataSource() {  
        DruidDataSource druidDataSource = new DruidDataSource();  
        return druidDataSource;  
    }  
}
